package com.shop.front.property;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Data
@Component
public class BusinessProps {


    @Value("${spring.profiles.active}")
    private String environment;

    @Value("${com.shop.login.tokenTimeout}")
    private long tokenTimeout;

    @Value("${com.shop.login.tokenAesKey}")
    private String tokenAesKey;

    @Value("${com.shop.login.rsa.public-key}")
    private String loginRSAPublicKey;

    @Value("${com.shop.login.rsa.private-key}")
    private String loginRSAPrivateKey;

    @Value("${com.shop.register.initialPass}")
    private String initialPass;

    @Value("${com.shop.register.codeTimeOut}")
    private long codeTimeOut;
    public boolean isProEnv(){
        return "pro".equalsIgnoreCase(this.environment);
    }
}
